Allow detecting whether service https is unset#3601
Conversation
Make the `https` service configuration property `Optional`. This allows to determine whether the property was omitted or explicitly set by the user. In a future version, we could use that to improve validation or change the default on the server. For now, the behavior is unchanged - an unset `https` is equivalent to `https: true`. Backwards compatibility is preserved for the most part, except two side effects: - Users may see a phantom `https` change in the run plan when redeploying a service after upgrading to CLI 0.20.12+. This, however, will not block the rolling deployment and will not cause any actual changes to the service behavior. - Users with a pre-0.20.12 CLI will not be able to trigger a rolling deployment on a service deployed with a 0.20.12+ CLI and will see the `Failed to apply plan. Resource has been changed` error message.
|
Tested this on a live server with two gateways (private + public). The One thing I noticed: old CLIs crash when listing services that have Should we also exclude |
peterschmidt85
left a comment
There was a problem hiding this comment.
Tested with both the new CLI (from this branch) and old CLI (0.20.11) against this branch's server. New CLI handles https: null and https: auto correctly. Old CLI can list, get, apply, and force-redeploy services that have https: null — no errors. See my comment above re https: "auto" compat.
Make the
httpsservice configuration propertyOptional. This allows to determine whether theproperty was omitted or explicitly set by the
user. In a future version, we could use that to
improve validation or change the default on the
server. For now, the behavior is unchanged - an
unset
httpsis equivalent tohttps: true.Backwards compatibility is preserved for the most
part, except two side effects:
httpschange in therun plan when redeploying a service after
upgrading to CLI 0.20.12+. This, however, will
not block the rolling deployment and will not
cause any actual changes to the service
behavior.
trigger a rolling deployment on a service
deployed with a 0.20.12+ CLI and will see the
Failed to apply plan. Resource has been changederror message.